<?php

	class Answer_model extends Model {

		protected $__tbname = 'answer';
		protected $__dbconf = '';

		var $id;	//int(11)	Primary Key	Auto Increment	NOT NULL
		var $question_id;	//int(11)			NOT NULL
		var $code;	//varchar(30)			NULL
		var $content;	//text			NULL
		var $is_correct = 0;	//int(1)			NOT NULL

		protected $__validation_rule = array(
			'id' => array('key' => 'PRI', 'type' => 'int', 'null' => FALSE, 'auto_increment' => TRUE),
			'question_id' => array('key' => 'MUL', 'type' => 'int', 'null' => FALSE),
			'code' => array('type' => 'varchar', 'size' => 30, 'null' => TRUE),
			'content' => array('type' => 'text', 'null' => TRUE),
			'is_correct' => array('type' => 'int', 'null' => FALSE)
		);
	}
